negotiator.bidding
Class BidDetailsSorterTime

java.lang.Object
  extended by negotiator.bidding.BidDetailsSorterTime
All Implemented Interfaces:
java.util.Comparator<BidDetails>

public class BidDetailsSorterTime
extends java.lang.Object
implements java.util.Comparator<BidDetails>

Comparator which sorts a set of BidDetails based on their time of offering. The bid which was offered last is on the front of the list.


Constructor Summary
BidDetailsSorterTime()
           
 
Method Summary
 int compare(BidDetails b1, BidDetails b2)
          Comperator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

BidDetailsSorterTime

public BidDetailsSorterTime()
Method Detail

compare

public int compare(BidDetails b1,
                   BidDetails b2)
Comperator. If time b1 > b2 then -1, else if < then 1, else compare hashcodes.

Specified by:
compare in interface java.util.Comparator<BidDetails>